package com.iaz.tech.tools.uml.file.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
 
import com.iaz.tech.tools.uml.IUMLNeuronAble; 
import com.iaz.tech.tools.uml.relationship.Relationship;
import com.iaz.tech.tools.uml.relationship.impl.NeuronMergeRelationship;

import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper=false)
@Data
public class NeuronMergeLoader extends NeuronRelationLoader {
    /**
     * 日志
     */
	private final static Logger logger = (Logger) LoggerFactory.getLogger(NeuronMergeLoader.class);

    @Override
    public Relationship toRelationship(IUMLNeuronAble umlObj) throws Exception {
        if (umlObj == null) {
            throw new IllegalArgumentException("umlObj 不能为空");
        }
        if (!(umlObj instanceof NeuronMergeRelationship)){
            throw new IllegalArgumentException("umlObj 必须是NeuronMergeRelationship 类型");
        } 
        NeuronMergeRelationship merge_relation = (NeuronMergeRelationship) umlObj;
        return merge_relation;
    }
}
